home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 22 / CU Amiga Magazine's Super CD-ROM 22 (1998)(EMAP Images)(GB)[!][issue 1998-05].iso / PowerPC / Programming / PPCSmallEiffel / bin_c / compile_to_c6.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-16  |  17.5 KB  |  651 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "compile_to_c.h"
  9. T0* r235item(T235* C,int a1){
  10. T0* R=NULL;
  11. R=((((T235*)C))->_storage/*0*/)[(a1)-((((T235*)C))->_lower/*12*/)];
  12. return R;
  13. }
  14. /*No:ARRAY[CREATION_CLAUSE].storage*/
  15. /*No:ARRAY[CREATION_CLAUSE].capacity*/
  16. /*No:ARRAY[CREATION_CLAUSE].lower*/
  17. /*No:ARRAY[CREATION_CLAUSE].put*/
  18. /*No:ARRAY[CREATION_CLAUSE].upper*/
  19. int r235count(T235* C){
  20. int R=0;
  21. R=(((((T235*)C))->_upper/*8*/)-((((T235*)C))->_lower/*12*/))+(1);
  22. return R;
  23. }
  24. void r235add_last(T235* C,T0* a1){
  25. int _new_capacity=0;
  26. /*IF*/if (((((T235*)C))->_capacity/*4*/)<((r235count(C))+(1))) {
  27. /*IF*/if (((((T235*)C))->_capacity/*4*/)==(0)) {
  28. C->_capacity=16;
  29. C->_storage=calloc((((T235*)C))->_capacity/*4*/,sizeof(T0*));
  30. }
  31. else {
  32. _new_capacity=(2)*((((T235*)C))->_capacity/*4*/);
  33. C->_storage=r513realloc((((T235*)C))->_storage/*0*/,(((T235*)C))->_capacity/*4*/,_new_capacity);
  34. C->_capacity=_new_capacity;
  35. }
  36. /*FI*/}
  37. /*FI*/C->_upper=((((T235*)C))->_upper/*8*/)+(1);
  38. /*[IRF3.6put*/{T235* C1=C;
  39. T0* b1=a1;
  40. int b2=(((T235*)C))->_upper/*8*/;
  41. ((((T235*)C1))->_storage/*0*/)[(b2)-((((T235*)C1))->_lower/*12*/)]=(b1);
  42. }/*]*/
  43. }
  44. T0* r235first(T235* C){
  45. T0* R=NULL;
  46. R=r235item(C,(((T235*)C))->_lower/*12*/);
  47. return R;
  48. }
  49. void r477clear_all(T477* C){
  50. T0* _value=NULL;
  51. /*[IRF3.6set_all_with*/{T477* C1=C;
  52. T0* b1=_value;
  53. r778set_all_with((((T477*)C1))->_storage/*4*/,b1,((((T477*)C1))->_upper/*12*/)-((((T477*)C1))->_lower/*16*/));
  54. }/*]*/
  55. }
  56. /*No:ARRAY[RUN_FEATURE].set_all_with*/
  57. void r477force(T477* C,T0* a1,int a2){
  58. /*IF*/if (((((T477*)C))->_upper/*12*/)<(a2)) {
  59. r477resize(C,(((T477*)C))->_lower/*16*/,a2);
  60. }
  61.  else if ((a2)<((((T477*)C))->_lower/*16*/)) {
  62. r477resize(C,a2,(((T477*)C))->_upper/*12*/);
  63. }
  64. /*FI*//*[IRF3.6put*/{T477* C1=C;
  65. T0* b1=a1;
  66. int b2=a2;
  67. ((((T477*)C1))->_storage/*4*/)[(b2)-((((T477*)C1))->_lower/*16*/)]=(b1);
  68. }/*]*/
  69. }
  70. void r477make(T477* C,int a1,int a2){
  71. int _needed=0;
  72. C->_lower=a1;
  73. C->_upper=a2;
  74. _needed=((a2)-(a1))+(1);
  75. /*IF*/if ((_needed)>(0)) {
  76. /*IF*/if (((((T477*)C))->_capacity/*8*/)<(_needed)) {
  77. /*IF*/if (((((T477*)C))->_capacity/*8*/)==(0)) {
  78. C->_storage=calloc(_needed,sizeof(T0*));
  79. }
  80. else {
  81. C->_storage=calloc(_needed,sizeof(T0*));
  82. }
  83. /*FI*/C->_capacity=_needed;
  84. }
  85. else {
  86. r477clear_all(C);
  87. }
  88. /*FI*/}
  89. /*FI*/}
  90. T0* r477item(T477* C,int a1){
  91. T0* R=NULL;
  92. R=((((T477*)C))->_storage/*4*/)[(a1)-((((T477*)C))->_lower/*16*/)];
  93. return R;
  94. }
  95. void r477resize(T477* C,int a1,int a2){
  96. int _mem=0;
  97. int _up=0;
  98. int _i=0;
  99. T0* _other=NULL;
  100. {T477*n=malloc(sizeof(*n));
  101. *n=M477;
  102. r477make(n,a1,a2);
  103. _other=(T0*)n;
  104. }
  105. _i=r2max((((T477*)C))->_lower/*16*/,/*X477*/((int)(((T477*)((T477*)_other)))->_lower/*16*/));
  106. _up=r2min((((T477*)C))->_upper/*12*/,/*X477*/((int)(((T477*)((T477*)_other)))->_upper/*12*/));
  107. while (!((_i)>(_up))) {
  108. /*X477*//*[IRF3.6put*/{T477* C1=((T477*)_other);
  109. T0* b1=r477item(C,_i);
  110. int b2=_i;
  111. ((((T477*)C1))->_storage/*4*/)[(b2)-((((T477*)C1))->_lower/*16*/)]=(b1);
  112. }/*]*/
  113. _i=(_i)+(1);
  114. }
  115. *((T477*)(C))=*((T477*)(_other));
  116. }
  117. /*No:ARRAY[RUN_FEATURE].storage*/
  118. /*No:ARRAY[RUN_FEATURE].capacity*/
  119. /*No:ARRAY[RUN_FEATURE].lower*/
  120. /*No:ARRAY[RUN_FEATURE].put*/
  121. /*No:ARRAY[RUN_FEATURE].upper*/
  122. int r477count(T477* C){
  123. int R=0;
  124. R=(((((T477*)C))->_upper/*12*/)-((((T477*)C))->_lower/*16*/))+(1);
  125. return R;
  126. }
  127. T0* r147item(T147* C,int a1){
  128. T0* R=NULL;
  129. R=((((T147*)C))->_storage/*0*/)[(a1)-((((T147*)C))->_lower/*12*/)];
  130. return R;
  131. }
  132. /*No:ARRAY[E_WHEN].storage*/
  133. T0* r147twin(T147* C){
  134. T0* R=NULL;
  135. R=malloc(sizeof(*C));
  136. *((T147*)R)=M147;
  137. r147copy(((T147*)R),((T0*)C));
  138. return R;
  139. }
  140. /*No:ARRAY[E_WHEN].capacity*/
  141. void r147copy(T147* C,T0* a1){
  142. int _needed_capacity=0;
  143. C->_lower=(((T147*)((T147*)a1)))->_lower/*12*/;
  144. C->_upper=(((T147*)((T147*)a1)))->_upper/*8*/;
  145. _needed_capacity=(((((T147*)C))->_upper/*8*/)-((((T147*)C))->_lower/*12*/))+(1);
  146. /*IF*/if (((((T147*)C))->_capacity/*4*/)<(_needed_capacity)) {
  147. C->_capacity=_needed_capacity;
  148. C->_storage=calloc((((T147*)C))->_capacity/*4*/,sizeof(T0*));
  149. }
  150. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  151. r586copy_from((((T147*)C))->_storage/*0*/,(((T147*)((T147*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
  152. }
  153. /*FI*/}
  154. /*No:ARRAY[E_WHEN].lower*/
  155. /*No:ARRAY[E_WHEN].put*/
  156. /*No:ARRAY[E_WHEN].upper*/
  157. int r147count(T147* C){
  158. int R=0;
  159. R=(((((T147*)C))->_upper/*8*/)-((((T147*)C))->_lower/*12*/))+(1);
  160. return R;
  161. }
  162. void r147add_last(T147* C,T0* a1){
  163. int _new_capacity=0;
  164. /*IF*/if (((((T147*)C))->_capacity/*4*/)<((r147count(C))+(1))) {
  165. /*IF*/if (((((T147*)C))->_capacity/*4*/)==(0)) {
  166. C->_capacity=16;
  167. C->_storage=calloc((((T147*)C))->_capacity/*4*/,sizeof(T0*));
  168. }
  169. else {
  170. _new_capacity=(2)*((((T147*)C))->_capacity/*4*/);
  171. C->_storage=r586realloc((((T147*)C))->_storage/*0*/,(((T147*)C))->_capacity/*4*/,_new_capacity);
  172. C->_capacity=_new_capacity;
  173. }
  174. /*FI*/}
  175. /*FI*/C->_upper=((((T147*)C))->_upper/*8*/)+(1);
  176. /*[IRF3.6put*/{T147* C1=C;
  177. T0* b1=a1;
  178. int b2=(((T147*)C))->_upper/*8*/;
  179. ((((T147*)C1))->_storage/*0*/)[(b2)-((((T147*)C1))->_lower/*12*/)]=(b1);
  180. }/*]*/
  181. }
  182. /*No:FIXED_ARRAY[TYPE_BIT_REF].item*/
  183. /*No:FIXED_ARRAY[TYPE_BIT_REF].storage*/
  184. /*No:FIXED_ARRAY[TYPE_BIT_REF].capacity*/
  185. void r41with_capacity(T41* C,int a1){
  186. /*IF*/if (((((T41*)C))->_capacity/*8*/)<(a1)) {
  187. C->_storage=calloc(a1,sizeof(T0*));
  188. C->_capacity=a1;
  189. }
  190. /*FI*/C->_upper=-(1);
  191. }
  192. /*No:FIXED_ARRAY[TYPE_BIT_REF].put*/
  193. /*No:FIXED_ARRAY[TYPE_BIT_REF].upper*/
  194. void r41add_last(T41* C,T0* a1){
  195. int _new_capacity=0;
  196. /*IF*/if ((((((T41*)C))->_upper/*12*/)+(1))<=(((((T41*)C))->_capacity/*8*/)-(1))) {
  197. C->_upper=((((T41*)C))->_upper/*12*/)+(1);
  198. }
  199.  else if (((((T41*)C))->_capacity/*8*/)==(0)) {
  200. C->_storage=calloc(2,sizeof(T0*));
  201. C->_capacity=2;
  202. C->_upper=0;
  203. }
  204. else {
  205. _new_capacity=(2)*((((T41*)C))->_capacity/*8*/);
  206. C->_storage=r539realloc((((T41*)C))->_storage/*4*/,(((T41*)C))->_capacity/*8*/,_new_capacity);
  207. C->_capacity=_new_capacity;
  208. C->_upper=((((T41*)C))->_upper/*12*/)+(1);
  209. }
  210. /*FI*//*[IRF3.5put*/((((T41*)C))->_storage/*4*/)[(((T41*)C))->_upper/*12*/]=(a1);
  211. /*]*/
  212. }
  213. /*No:FIXED_ARRAY[INTEGER].clear_all*/
  214. /*No:FIXED_ARRAY[INTEGER].set_all_with*/
  215. void r226make(T226* C,int a1){
  216. /*IF*/if ((a1)==(0)) {
  217. C->_upper=-(1);
  218. }
  219.  else if (((((T226*)C))->_capacity/*4*/)==(0)) {
  220. C->_storage=calloc(a1,sizeof(int));
  221. C->_capacity=a1;
  222. C->_upper=(a1)-(1);
  223. }
  224.  else if (((((T226*)C))->_capacity/*4*/)<(a1)) {
  225. C->_storage=calloc(a1,sizeof(int));
  226. C->_capacity=a1;
  227. C->_upper=(a1)-(1);
  228. }
  229. else {
  230. C->_upper=(a1)-(1);
  231. /*[IRF3.6clear_all*/{T226* C1=C;
  232. int __value=0;
  233. /*[IRF3.6set_all_with*/{T226* C2=C1;
  234. int c1=__value;
  235. r686set_all_with((((T226*)C2))->_storage/*0*/,c1,(((T226*)C2))->_upper/*8*/);
  236. }/*]*/
  237. }/*]*/
  238. }
  239. /*FI*/}
  240. int r226fast_has(T226* C,int a1){
  241. int R=0;
  242. /*IF*/if ((/*(IRF4.6count*/((((T226*)C))->_upper/*8*/)+(1)/*)*/)>(0)) {
  243. R=(r226fast_index_of(C,a1))<=((((T226*)C))->_upper/*8*/);
  244. }
  245. /*FI*/return R;
  246. }
  247. /*No:FIXED_ARRAY[INTEGER].item*/
  248. void r226resize(T226* C,int a1){
  249. int _elt_default=0;
  250. int _i=0;
  251. int _new_capacity=0;
  252. /*IF*/if ((a1)<=(/*(IRF4.6count*/((((T226*)C))->_upper/*8*/)+(1)/*)*/)) {
  253. C->_upper=(a1)-(1);
  254. }
  255. else {
  256. _new_capacity=a1;
  257. /*IF*/if (((((T226*)C))->_capacity/*4*/)<(_new_capacity)) {
  258. /*IF*/if (((((T226*)C))->_capacity/*4*/)==(0)) {
  259. C->_storage=calloc(_new_capacity,sizeof(int));
  260. }
  261. else {
  262. C->_storage=r686realloc((((T226*)C))->_storage/*0*/,(((T226*)C))->_capacity/*4*/,_new_capacity);
  263. }
  264. /*FI*/C->_capacity=_new_capacity;
  265. }
  266. /*FI*/_new_capacity=(((T226*)C))->_upper/*8*/;
  267. C->_upper=(a1)-(1);
  268. _i=(((T226*)C))->_upper/*8*/;
  269. while (!((_i)==(_new_capacity))) {
  270. /*[IRF3.5put*/((((T226*)C))->_storage/*0*/)[_i]=(_elt_default);
  271. /*]*/
  272. _i=(_i)-(1);
  273. }
  274. }
  275. /*FI*/}
  276. /*No:FIXED_ARRAY[INTEGER].storage*/
  277. /*No:FIXED_ARRAY[INTEGER].capacity*/
  278. void r226copy(T226* C,T0* a1){
  279. int _new_capacity=0;
  280. int _other_upper=0;
  281. _other_upper=(((T226*)((T226*)a1)))->_upper/*8*/;
  282. /*IF*/if ((_other_upper)>=(0)) {
  283. _new_capacity=(_other_upper)+(1);
  284. /*IF*/if (((((T226*)C))->_capacity/*4*/)<(_new_capacity)) {
  285. C->_capacity=_new_capacity;
  286. C->_storage=calloc(_new_capacity,sizeof(int));
  287. }
  288.  else if (((((T226*)C))->_capacity/*4*/)>(0)) {
  289. r686clear_all((((T226*)C))->_storage/*0*/,((((T226*)C))->_capacity/*4*/)-(1));
  290. }
  291. /*FI*/r686copy_from((((T226*)C))->_storage/*0*/,(((T226*)((T226*)a1)))->_storage/*0*/,_other_upper);
  292. }
  293.  else if (((((T226*)C))->_capacity/*4*/)>(0)) {
  294. r686clear_all((((T226*)C))->_storage/*0*/,((((T226*)C))->_capacity/*4*/)-(1));
  295. }
  296. /*FI*/C->_upper=_other_upper;
  297. }
  298. /*No:FIXED_ARRAY[INTEGER].lower*/
  299. void r226with_capacity(T226* C,int a1){
  300. /*IF*/if (((((T226*)C))->_capacity/*4*/)<(a1)) {
  301. C->_storage=calloc(a1,sizeof(int));
  302. C->_capacity=a1;
  303. }
  304. /*FI*/C->_upper=-(1);
  305. }
  306. int r226fast_index_of(T226* C,int a1){
  307. int R=0;
  308. R=r686fast_index_of((((T226*)C))->_storage/*0*/,a1,(((T226*)C))->_upper/*8*/);
  309. return R;
  310. }
  311. /*No:FIXED_ARRAY[INTEGER].put*/
  312. /*No:FIXED_ARRAY[INTEGER].upper*/
  313. /*No:FIXED_ARRAY[INTEGER].count*/
  314. void r226add_last(T226* C,int a1){
  315. int _new_capacity=0;
  316. /*IF*/if ((((((T226*)C))->_upper/*8*/)+(1))<=(((((T226*)C))->_capacity/*4*/)-(1))) {
  317. C->_upper=((((T226*)C))->_upper/*8*/)+(1);
  318. }
  319.  else if (((((T226*)C))->_capacity/*4*/)==(0)) {
  320. C->_storage=calloc(2,sizeof(int));
  321. C->_capacity=2;
  322. C->_upper=0;
  323. }
  324. else {
  325. _new_capacity=(2)*((((T226*)C))->_capacity/*4*/);
  326. C->_storage=r686realloc((((T226*)C))->_storage/*0*/,(((T226*)C))->_capacity/*4*/,_new_capacity);
  327. C->_capacity=_new_capacity;
  328. C->_upper=((((T226*)C))->_upper/*8*/)+(1);
  329. }
  330. /*FI*//*[IRF3.5put*/((((T226*)C))->_storage/*0*/)[(((T226*)C))->_upper/*8*/]=(a1);
  331. /*]*/
  332. }
  333. void r32clear_all(T32* C){
  334. T0* _value=NULL;
  335. /*[IRF3.6set_all_with*/{T32* C1=C;
  336. T0* b1=_value;
  337. r500set_all_with((((T32*)C1))->_storage/*4*/,b1,(((T32*)C1))->_upper/*12*/);
  338. }/*]*/
  339. }
  340. /*No:FIXED_ARRAY[EXPRESSION].set_all_with*/
  341. void r32make(T32* C,int a1){
  342. /*IF*/if ((a1)==(0)) {
  343. C->_upper=-(1);
  344. }
  345.  else if (((((T32*)C))->_capacity/*8*/)==(0)) {
  346. C->_storage=calloc(a1,sizeof(T0*));
  347. C->_capacity=a1;
  348. C->_upper=(a1)-(1);
  349. }
  350.  else if (((((T32*)C))->_capacity/*8*/)<(a1)) {
  351. C->_storage=calloc(a1,sizeof(T0*));
  352. C->_capacity=a1;
  353. C->_upper=(a1)-(1);
  354. }
  355. else {
  356. C->_upper=(a1)-(1);
  357. r32clear_all(C);
  358. }
  359. /*FI*/}
  360. T0* r32item(T32* C,int a1){
  361. T0* R=NULL;
  362. R=((((T32*)C))->_storage/*4*/)[a1];
  363. return R;
  364. }
  365. void r32resize(T32* C,int a1){
  366. T0* _elt_default=NULL;
  367. int _i=0;
  368. int _new_capacity=0;
  369. /*IF*/if ((a1)<=(r32count(C))) {
  370. C->_upper=(a1)-(1);
  371. }
  372. else {
  373. _new_capacity=a1;
  374. /*IF*/if (((((T32*)C))->_capacity/*8*/)<(_new_capacity)) {
  375. /*IF*/if (((((T32*)C))->_capacity/*8*/)==(0)) {
  376. C->_storage=calloc(_new_capacity,sizeof(T0*));
  377. }
  378. else {
  379. C->_storage=r500realloc((((T32*)C))->_storage/*4*/,(((T32*)C))->_capacity/*8*/,_new_capacity);
  380. }
  381. /*FI*/C->_capacity=_new_capacity;
  382. }
  383. /*FI*/_new_capacity=(((T32*)C))->_upper/*12*/;
  384. C->_upper=(a1)-(1);
  385. _i=(((T32*)C))->_upper/*12*/;
  386. while (!((_i)==(_new_capacity))) {
  387. /*[IRF3.6put*/{T32* C1=C;
  388. T0* b1=_elt_default;
  389. int b2=_i;
  390. ((((T32*)C1))->_storage/*4*/)[b2]=(b1);
  391. }/*]*/
  392. _i=(_i)-(1);
  393. }
  394. }
  395. /*FI*/}
  396. /*No:FIXED_ARRAY[EXPRESSION].storage*/
  397. /*No:FIXED_ARRAY[EXPRESSION].capacity*/
  398. /*No:FIXED_ARRAY[EXPRESSION].put*/
  399. /*No:FIXED_ARRAY[EXPRESSION].upper*/
  400. int r32count(T32* C){
  401. int R=0;
  402. R=((((T32*)C))->_upper/*12*/)+(1);
  403. return R;
  404. }
  405. /*No:ARRAY[DICTIONARY[RUN_FEATURE,STRING]].clear_all*/
  406. /*No:ARRAY[DICTIONARY[RUN_FEATURE,STRING]].set_all_with*/
  407. void r943make(T943* C,int a1,int a2){
  408. int _needed=0;
  409. C->_lower=a1;
  410. C->_upper=a2;
  411. _needed=((a2)-(a1))+(1);
  412. /*IF*/if ((_needed)>(0)) {
  413. /*IF*/if (((((T943*)C))->_capacity/*4*/)<(_needed)) {
  414. /*IF*/if (((((T943*)C))->_capacity/*4*/)==(0)) {
  415. C->_storage=calloc(_needed,sizeof(T0*));
  416. }
  417. else {
  418. C->_storage=calloc(_needed,sizeof(T0*));
  419. }
  420. /*FI*/C->_capacity=_needed;
  421. }
  422. else {
  423. /*[IRF3.6clear_all*/{T943* C1=C;
  424. T0* __value=NULL;
  425. /*[IRF3.6set_all_with*/{T943* C2=C1;
  426. T0* c1=__value;
  427. r354set_all_with((((T943*)C2))->_storage/*0*/,c1,((((T943*)C2))->_upper/*8*/)-((((T943*)C2))->_lower/*12*/));
  428. }/*]*/
  429. }/*]*/
  430. }
  431. /*FI*/}
  432. /*FI*/}
  433. T0* r943item(T943* C,int a1){
  434. T0* R=NULL;
  435. R=((((T943*)C))->_storage/*0*/)[(a1)-((((T943*)C))->_lower/*12*/)];
  436. return R;
  437. }
  438. void r943resize(T943* C,int a1,int a2){
  439. int _mem=0;
  440. int _up=0;
  441. int _i=0;
  442. T0* _other=NULL;
  443. {T943*n=malloc(sizeof(*n));
  444. *n=M943;
  445. r943make(n,a1,a2);
  446. _other=(T0*)n;
  447. }
  448. _i=r2max((((T943*)C))->_lower/*12*/,(((T943*)((T943*)_other)))->_lower/*12*/);
  449. _up=r2min((((T943*)C))->_upper/*8*/,(((T943*)((T943*)_other)))->_upper/*8*/);
  450. while (!((_i)>(_up))) {
  451. /*[IRF3.6put*/{T943* C1=((T943*)_other);
  452. T0* b1=r943item(C,_i);
  453. int b2=_i;
  454. ((((T943*)C1))->_storage/*0*/)[(b2)-((((T943*)C1))->_lower/*12*/)]=(b1);
  455. }/*]*/
  456. _i=(_i)+(1);
  457. }
  458. *((T943*)(C))=*((T943*)(_other));
  459. }
  460. /*No:ARRAY[DICTIONARY[RUN_FEATURE,STRING]].storage*/
  461. /*No:ARRAY[DICTIONARY[RUN_FEATURE,STRING]].capacity*/
  462. /*No:ARRAY[DICTIONARY[RUN_FEATURE,STRING]].lower*/
  463. /*No:ARRAY[DICTIONARY[RUN_FEATURE,STRING]].put*/
  464. /*No:ARRAY[DICTIONARY[RUN_FEATURE,STRING]].upper*/
  465. int r943count(T943* C){
  466. int R=0;
  467. R=(((((T943*)C))->_upper/*8*/)-((((T943*)C))->_lower/*12*/))+(1);
  468. return R;
  469. }
  470. /*No:FIXED_ARRAY[CALL_PROC_CALL].clear_all*/
  471. /*No:FIXED_ARRAY[CALL_PROC_CALL].set_all_with*/
  472. void r569make(T569* C,int a1){
  473. /*IF*/if ((a1)==(0)) {
  474. C->_upper=-(1);
  475. }
  476.  else if (((((T569*)C))->_capacity/*4*/)==(0)) {
  477. C->_storage=calloc(a1,sizeof(T0*));
  478. C->_capacity=a1;
  479. C->_upper=(a1)-(1);
  480. }
  481.  else if (((((T569*)C))->_capacity/*4*/)<(a1)) {
  482. C->_storage=calloc(a1,sizeof(T0*));
  483. C->_capacity=a1;
  484. C->_upper=(a1)-(1);
  485. }
  486. else {
  487. C->_upper=(a1)-(1);
  488. /*[IRF3.6clear_all*/{T569* C1=C;
  489. T0* __value=NULL;
  490. /*[IRF3.6set_all_with*/{T569* C2=C1;
  491. T0* c1=__value;
  492. r98set_all_with((((T569*)C2))->_storage/*0*/,c1,(((T569*)C2))->_upper/*8*/);
  493. }/*]*/
  494. }/*]*/
  495. }
  496. /*FI*/}
  497. void r569resize(T569* C,int a1){
  498. T0* _elt_default=NULL;
  499. int _i=0;
  500. int _new_capacity=0;
  501. /*IF*/if ((a1)<=(/*(IRF4.6count*/((((T569*)C))->_upper/*8*/)+(1)/*)*/)) {
  502. C->_upper=(a1)-(1);
  503. }
  504. else {
  505. _new_capacity=a1;
  506. /*IF*/if (((((T569*)C))->_capacity/*4*/)<(_new_capacity)) {
  507. /*IF*/if (((((T569*)C))->_capacity/*4*/)==(0)) {
  508. C->_storage=calloc(_new_capacity,sizeof(T0*));
  509. }
  510. else {
  511. C->_storage=r98realloc((((T569*)C))->_storage/*0*/,(((T569*)C))->_capacity/*4*/,_new_capacity);
  512. }
  513. /*FI*/C->_capacity=_new_capacity;
  514. }
  515. /*FI*/_new_capacity=(((T569*)C))->_upper/*8*/;
  516. C->_upper=(a1)-(1);
  517. _i=(((T569*)C))->_upper/*8*/;
  518. while (!((_i)==(_new_capacity))) {
  519. /*[IRF3.5put*/((((T569*)C))->_storage/*0*/)[_i]=(_elt_default);
  520. /*]*/
  521. _i=(_i)-(1);
  522. }
  523. }
  524. /*FI*/}
  525. /*No:FIXED_ARRAY[CALL_PROC_CALL].storage*/
  526. /*No:FIXED_ARRAY[CALL_PROC_CALL].capacity*/
  527. /*No:FIXED_ARRAY[CALL_PROC_CALL].put*/
  528. /*No:FIXED_ARRAY[CALL_PROC_CALL].upper*/
  529. /*No:FIXED_ARRAY[CALL_PROC_CALL].count*/
  530. /*No:ARRAY[INTEGER].clear_all*/
  531. /*No:ARRAY[INTEGER].set_all_with*/
  532. void r429make(T429* C,int a1,int a2){
  533. int _needed=0;
  534. C->_lower=a1;
  535. C->_upper=a2;
  536. _needed=((a2)-(a1))+(1);
  537. /*IF*/if ((_needed)>(0)) {
  538. /*IF*/if (((((T429*)C))->_capacity/*4*/)<(_needed)) {
  539. /*IF*/if (((((T429*)C))->_capacity/*4*/)==(0)) {
  540. C->_storage=calloc(_needed,sizeof(int));
  541. }
  542. else {
  543. C->_storage=calloc(_needed,sizeof(int));
  544. }
  545. /*FI*/C->_capacity=_needed;
  546. }
  547. else {
  548. /*[IRF3.6clear_all*/{T429* C1=C;
  549. int __value=0;
  550. /*[IRF3.6set_all_with*/{T429* C2=C1;
  551. int c1=__value;
  552. r686set_all_with((((T429*)C2))->_storage/*0*/,c1,((((T429*)C2))->_upper/*8*/)-((((T429*)C2))->_lower/*12*/));
  553. }/*]*/
  554. }/*]*/
  555. }
  556. /*FI*/}
  557. /*FI*/}
  558. int r429item(T429* C,int a1){
  559. int R=0;
  560. R=((((T429*)C))->_storage/*0*/)[(a1)-((((T429*)C))->_lower/*12*/)];
  561. return R;
  562. }
  563. void r429resize(T429* C,int a1,int a2){
  564. int _mem=0;
  565. int _up=0;
  566. int _i=0;
  567. T0* _other=NULL;
  568. {T429*n=malloc(sizeof(*n));
  569. *n=M429;
  570. r429make(n,a1,a2);
  571. _other=(T0*)n;
  572. }
  573. _i=r2max((((T429*)C))->_lower/*12*/,(((T429*)((T429*)_other)))->_lower/*12*/);
  574. _up=r2min((((T429*)C))->_upper/*8*/,(((T429*)((T429*)_other)))->_upper/*8*/);
  575. while (!((_i)>(_up))) {
  576. /*[IRF3.6put*/{T429* C1=((T429*)_other);
  577. int b1=r429item(C,_i);
  578. int b2=_i;
  579. ((((T429*)C1))->_storage/*0*/)[(b2)-((((T429*)C1))->_lower/*12*/)]=(b1);
  580. }/*]*/
  581. _i=(_i)+(1);
  582. }
  583. *((T429*)(C))=*((T429*)(_other));
  584. }
  585. /*No:ARRAY[INTEGER].storage*/
  586. /*No:ARRAY[INTEGER].capacity*/
  587. /*No:ARRAY[INTEGER].lower*/
  588. /*No:ARRAY[INTEGER].put*/
  589. /*No:ARRAY[INTEGER].upper*/
  590. void r429add_last(T429* C,int a1){
  591. int _new_capacity=0;
  592. /*IF*/if (((((T429*)C))->_capacity/*4*/)<((r429count(C))+(1))) {
  593. /*IF*/if (((((T429*)C))->_capacity/*4*/)==(0)) {
  594. C->_capacity=16;
  595. C->_storage=calloc((((T429*)C))->_capacity/*4*/,sizeof(int));
  596. }
  597. else {
  598. _new_capacity=(2)*((((T429*)C))->_capacity/*4*/);
  599. C->_storage=r686realloc((((T429*)C))->_storage/*0*/,(((T429*)C))->_capacity/*4*/,_new_capacity);
  600. C->_capacity=_new_capacity;
  601. }
  602. /*FI*/}
  603. /*FI*/C->_upper=((((T429*)C))->_upper/*8*/)+(1);
  604. /*[IRF3.6put*/{T429* C1=C;
  605. int b1=a1;
  606. int b2=(((T429*)C))->_upper/*8*/;
  607. ((((T429*)C1))->_storage/*0*/)[(b2)-((((T429*)C1))->_lower/*12*/)]=(b1);
  608. }/*]*/
  609. }
  610. int r429count(T429* C){
  611. int R=0;
  612. R=(((((T429*)C))->_upper/*8*/)-((((T429*)C))->_lower/*12*/))+(1);
  613. return R;
  614. }
  615. T0* r764item(T764* C,int a1){
  616. T0* R=NULL;
  617. R=((((T764*)C))->_storage/*0*/)[(a1)-((((T764*)C))->_lower/*12*/)];
  618. return R;
  619. }
  620. /*No:ARRAY[FEATURE_CLAUSE].storage*/
  621. /*No:ARRAY[FEATURE_CLAUSE].capacity*/
  622. /*No:ARRAY[FEATURE_CLAUSE].lower*/
  623. /*No:ARRAY[FEATURE_CLAUSE].put*/
  624. /*No:ARRAY[FEATURE_CLAUSE].upper*/
  625. int r764count(T764* C){
  626. int R=0;
  627. R=(((((T764*)C))->_upper/*8*/)-((((T764*)C))->_lower/*12*/))+(1);
  628. return R;
  629. }
  630. void r764add_last(T764* C,T0* a1){
  631. int _new_capacity=0;
  632. /*IF*/if (((((T764*)C))->_capacity/*4*/)<((r764count(C))+(1))) {
  633. /*IF*/if (((((T764*)C))->_capacity/*4*/)==(0)) {
  634. C->_capacity=16;
  635. C->_storage=calloc((((T764*)C))->_capacity/*4*/,sizeof(T0*));
  636. }
  637. else {
  638. _new_capacity=(2)*((((T764*)C))->_capacity/*4*/);
  639. C->_storage=r42realloc((((T764*)C))->_storage/*0*/,(((T764*)C))->_capacity/*4*/,_new_capacity);
  640. C->_capacity=_new_capacity;
  641. }
  642. /*FI*/}
  643. /*FI*/C->_upper=((((T764*)C))->_upper/*8*/)+(1);
  644. /*[IRF3.6put*/{T764* C1=C;
  645. T0* b1=a1;
  646. int b2=(((T764*)C))->_upper/*8*/;
  647. ((((T764*)C1))->_storage/*0*/)[(b2)-((((T764*)C1))->_lower/*12*/)]=(b1);
  648. }/*]*/
  649. }
  650.  
  651.